package com.koicarp.university.graduate.service.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.koicarp.university.graduate.service.dto.bigView.StaisfyLeanDto;
import com.koicarp.university.graduate.service.dto.dataCompare.SchoolCountDto;
import com.koicarp.university.graduate.service.entity.report.SchoolReport;
import com.koicarp.university.graduate.service.vo.dataCompare.EmployRateVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 【问卷管理：学校相关问卷表】(SchoolReport)表数据库访问层
 *
 * @author liutao
 * @since 2020-11-27 19:26:01
 */
public interface SchoolReportDao extends BaseMapper<SchoolReport> {

    List<StaisfyLeanDto> selectLeanByNowYear(@Param("year") String year);

    List<SchoolCountDto> countStudyByYear(@Param("employRateVo")EmployRateVo employRateVo);

    List<SchoolCountDto> countActivityByYear(@Param("employRateVo")EmployRateVo employRateVo);

    List<SchoolCountDto> countClassByYear(@Param("employRateVo")EmployRateVo employRateVo);

    List<SchoolCountDto>countLeanByYear(@Param("employRateVo")EmployRateVo employRateVo);
    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    SchoolReport queryById(Integer id);

    /**
     * 查询指定行数据
     *
     * @param offset 查询起始位置
     * @param limit  查询条数
     * @return 对象列表
     */
    List<SchoolReport> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);


    /**
     * 通过实体作为筛选条件查询
     *
     * @param schoolReport 实例对象
     * @return 对象列表
     */
    List<SchoolReport> queryAll(SchoolReport schoolReport);

    /**
     * 新增数据
     *
     * @param schoolReport 实例对象
     * @return 影响行数
     */
    int insert(SchoolReport schoolReport);

    /**
     * 修改数据
     *
     * @param schoolReport 实例对象
     * @return 影响行数
     */
    int update(SchoolReport schoolReport);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int deleteById(Integer id);

}